package com.zrrd.yunchmall.sale.controller;

import com.zrrd.yunchmall.sale.service.IFlashPromotionProductRelationService;
import com.zrrd.yunchmall.util.ResponseResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

/**
 * <p>
 * 商品限时购与商品关系表 前端控制器
 * </p>
 *
 * @author LYY
 * @since 2024-01-15
 */
@Controller
@RequestMapping("/sale/flashPromotionProductRelation")
public class FlashPromotionProductRelationController {
    @Autowired
    private IFlashPromotionProductRelationService iFlashPromotionProductRelationService;

    @ApiOperation("查看秒杀商品")
    @GetMapping("/list")
    public ResponseResult list(int pageNum, int pageSize,
                               long flashPromotionId, long flashPromotionSessionId) {

        return new ResponseResult(200, "查询成功",
                iFlashPromotionProductRelationService.selectProducts(pageNum, pageSize, flashPromotionId, flashPromotionSessionId));
    }
}
